package org.logMonitor.testJava;

import org.logMonitor.entity.Record;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * Created by lenovo on 2018/3/20.
 */
public class ReverseCollectiion {
    public static void main(String[] args) {
        List<Record> recordList = new ArrayList<Record>();
        Record record = new Record();
        record.setValue(12);
        record.setCreatTime("2012-01-02");
        Record record1 = new Record();
        record1.setValue(13);
        record1.setCreatTime("2012-01-01");
        recordList.add(record);
        recordList.add(record1);
        System.out.println(recordList);
        Collections.reverse(recordList);
        System.out.println(recordList);

    }

}
